/*
** struct.h for  in /home/gomes_m//rattrapage/server
** 
** Made by mickael gomes
** Login   <gomes_m@epitech.net>
** 
** Started on  Tue Jul 23 13:17:05 2013 mickael gomes
** Last update Wed Jul 31 00:04:54 2013 mickael gomes
*/

#ifndef			STRUCT_H_
# define		STRUCT_H_

# include		<netdb.h>

typedef struct		s_cmd
{
  int			pos;
  char			*cmd;
  char			*arguments;
  char			*result;
  char			**env;
  char			**paths;
  char			**cmd_tab;
  char			*home;
}			t_cmd;

typedef struct		s_list
{
  int			fd;
  t_cmd			*cmd;
  int			disconnected;
  int			local;
  char			*current_dir;
  struct s_list		*next;
}			t_list;

typedef struct		s_func
{
  void			(*f)(t_list *);
  char			*flag;
}			t_func;

typedef struct		s_socket
{
  struct sockaddr_in	sin;
  struct sockaddr_in	sin_client;
  struct sockaddr	*cast_sin_client;
  socklen_t		*cast_client_len;
  int			fds;
  int			fds_max;
  int			max_client;
  int			client_len;
  int			sock;
}			t_socket;

#endif			/* !STRUCT_H_ */
